#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    this->setWindowTitle("yes or no");
    ui->pushButton_yes->setToolTip("将文本设置yes");
    ui->pushButton_no->setToolTip("将文本设置成no");

    ui->pushButton_yes->setToolTipDuration(3000);
    ui->pushButton_no->setToolTipDuration(3000);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_yes_clicked()
{
    ui->label_2->setText("yes!!!");
}

void Widget::on_pushButton_no_clicked()
{
    ui->label_2->setText("no!!!");
}
